package at.fhooe.stefanirndorfer.entity;

import static org.lwjgl.opengl.GL11.GL_LINE_LOOP;
import static org.lwjgl.opengl.GL11.glBegin;
import static org.lwjgl.opengl.GL11.glColor3f;
import static org.lwjgl.opengl.GL11.glEnd;
import static org.lwjgl.opengl.GL11.glVertex2d;


/**
 * 
 * @author stefanirndorfer
 *
 * for debug purposes only: visualises the boundaries of a geometry changing
 *
 */
public class AffectedAreaBoundaries extends Entity{
	
	float[] color;

	public AffectedAreaBoundaries(double width, double height, double posX,
			double posY) {
		super(width, height, posX, posY);
		this.color = new float[]{1.0f, 0.0f, 0.0f};
	}

	@Override
	public void update(int delta) {
		
		
	}

	@Override
	public double[] getPosition() {
		return new double[]{posX, posY};
	}

	@Override
	public void render() {
		
		glColor3f(color[0], color[1], color[2]);
		glBegin(GL_LINE_LOOP);
		glVertex2d(posX, posY);
		glVertex2d(posX, posY - height);
		glVertex2d(posX + width, posY - height);
		glVertex2d(posX + width, posY);
		glEnd();
		
	}

}
